<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>CMS</title>
<link href="__CSS__/common.css" rel="stylesheet"/>
<link href="__CSS__/right.css" rel="stylesheet"/>
<link rel="stylesheet" href="__INC__/form/css/zebra_form.css" type="text/css">
<link rel="stylesheet" href="__INC__/kindeditor/themes/default/default.css"/>
<!--link rel="stylesheet" href="../kindeditor/plugins/code/prettify.css" /-->
<script type="text/javascript" src="__INC__/form/js/jquery-1.7.js"></script>
<script charset="utf-8" src="__INC__/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="__INC__/kindeditor/lang/zh_CN.js"></script>
<script charset="utf-8" src="__INC__/kindeditor/plugins/code/prettify.js"></script>
<script type="text/javascript" language="javascript" src="__JS__/common.js"></script>
<script type="text/javascript" language="javascript">
    $(document).ready(function () {
        $(".table_list tr").mouseover(function () {
            $(this).addClass("one");
        })
        $(".table_list tr").mouseout(function () {
            $(this).removeClass("one");
        })
    });
</script>
<style type="text/css">
    .one {
        background: #fcfcfc;
    }
</style>
</head>
<body>
<!--右侧区域 begin-->
<div class="right">
    <!--当前位置 begin-->
    <include file='common:crumbs'/>
    <!--当前位置 end-->
    <!--主体区域 begin-->
    <div class="container">
        <div class="alert_div">
            <h4 class="alert_info"><span class="welcome">{$welcome}</span>您现在的位置是：{$current} </h4>
            <h4 class="alert_what" style="display:none;"></h4>
        </div>
        <!--样式一 begin-->
        <div class="stats">
            <div class="lm_title">
                <div class="lm_title_l"><em>{$current}</em></div>
            </div>
            <div class="lm_content">
                <runphp>
                    echo $form_html;
                </runphp>
                <div class="clear"></div>
                <script type="text/javascript" src="__INC__/form/js/highlight.js"></script>
                <script type="text/javascript" src="__INC__/form/js/zebra_form.js"></script>
                <script type="text/javascript" src="__INC__/form/js/functions.js"></script>
            </div>
            <div class="lm_bottom">
                <div class="lm_bottom_l"><em></em></div>
            </div>
        </div>
        <!--样式一 end-->
    </div>
    <!--主体区域 end-->
</div>
<!--右侧区域  end-->
</body>
<script>
    var totleFilter = {$totleFilter};
    function getAttrSelect(obj, id) {
        var gtid = obj.value;
        $.post("__GROUP__/shopajax/getattrselect", {gtid: gtid}, function (data) {
            if (data == -1) {
                jl_notify(2, "该商品种类下没有属性可以选择！");
                $("#attribute_" + id).html('');
            } else if (data == -3) {
                jl_notify(2, "该商品种类下没有属性可以选择！");
                $("#attribute_" + id).html('');
            } else {
                $("#attribute_" + id).html(data);
            }
        })
    }

    function removeTr(id) {
        $(".tr_" + id).remove();
        totleFilter--;
    }

    $(function () {
        var html_str = '{$html_str}';
        if (typeof(html_str) != 'undefined' && html_str != '') {
            var html = $(html_str);
            html.insertBefore($(".last"));
        }

        $("#filter_add").click(function () {
            var html = $('<tr class="row tr_' + totleFilter + '"><td valign="top"><label id="label_filter_' + totleFilter + '" for="mkey">筛选属性' + totleFilter + ':</label></td><td valign="top"><select style="display:inline;" class="control select" id="goodstype_' + totleFilter + '" value="" onchange = "getAttrSelect(this,' + totleFilter + ')" ><option value="0"> - 请选择 - </option>{$selectHtml}</select><select  style="display:inline;" class="control select" id="attribute_' + totleFilter + '" name="filter[]"></select><input type="button" type="button" class="control button" value="移除" onclick="removeTr(' + totleFilter + ')" style="display:inline;margin-left:120px;"></input></td></tr>');
            html.insertBefore($(".last"));
            totleFilter++;
        });
    });
</script>
</html>
